/**
 * 
 */
package com.lehecai.core.lottery;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.lehecai.core.IntegerBeanLabelItem;

/**
 * @author Sunshow
 * 操作结果状态
 */
public class RechargeStatus extends IntegerBeanLabelItem {

	private static final Logger logger = LoggerFactory.getLogger(RechargeStatus.class.getName());
	
	private static final long serialVersionUID = -2655180046354667807L;
	
	private static List<RechargeStatus> items = new ArrayList<RechargeStatus>();
	
	protected RechargeStatus(String name, int value) {
		super(RechargeStatus.class.getName(), name, value);
		items.add(this);
	}
	
	public static RechargeStatus getItem(int value){
		try {
			return (RechargeStatus)RechargeStatus.getResult(RechargeStatus.class.getName(), value);
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
			return null;
		}
	}
	
	public static List<RechargeStatus> getItems() {
		return items;
	}

	public static final RechargeStatus ALL = new RechargeStatus("全部", -1);
	public static final RechargeStatus PENDING = new RechargeStatus("待处理", 0);
	public static final RechargeStatus SUCCESSFUL = new RechargeStatus("充值成功", 1);
	public static final RechargeStatus FAILED = new RechargeStatus("充值失败", 2);
	public static final RechargeStatus REFUND = new RechargeStatus("充值退款", 3);
	public static final RechargeStatus TIMEOUT = new RechargeStatus("超时未处理失败", 4);

}
